package com.kgc.smbms.controller;

import com.kgc.smbms.pojo.SmbmsProvider;
import com.kgc.smbms.service.SmbmsProviderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/provider")
public class SmbmsProviderController {

    @Autowired
    private SmbmsProviderService smbmsProviderService;

    @RequestMapping("/list")
    @ResponseBody//表示这是一个异步方法，响应的是一个json数据
    public List<SmbmsProvider> list(){

        return smbmsProviderService.SelectProviders();
    }

}
